home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hottest 6
/
Hottest 6 (1996)(PDSoft)[!].iso
/
software
/
videoutils
/
a-g
/
ami2d
/
macros
/
genregion.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1978-11-24
|
1KB
|
61 lines
/* script to generate region of nodes between two existing sets of nodes */
options results
address ami2d
if ~show('l', "rexxmathlib.library") then do
check = addlib('rexxmathlib.library',0,-30,0)
end
do n=1 to 4
'info(node)'
fn = result
parse var fn nd in junk
if in = 0 then exit
do m=1 to n-1
if in < i.m then do
do j=n-1 to m by -1
j1 = j+1
f.j1 = f.j
i.j1 = i.j
end
leave
end
end
f.m = fn
i.m = in
end
parse var f.1 nd i1a x1a y1a
parse var f.2 nd i1b x1b y1b
parse var f.3 nd i2a x2a y2a
parse var f.4 nd i2b x2b y2b
in = i1b - i1a
jn = (i2a - i1a)/(in + 1)
ni = in
'get jnodes'
if length(result) > 0 then nj = result%1 - 1
else nj = jn
'set jnodes 'nj + 1
'get jgrad'
if length(result) > 0 then gj = result
else gj = 1
do i=0 to ni
n1 = i1a + i
n2 = i2a + i
'info(node,'0 - n1')'
parse var result nd id xa ya
'info(node,'0 - n2')'
parse var result nd id xb yb
do j=0 to nj
n = n1 + j*(ni + 1)
xn = xa + (xb-xa)*pow(j/nj,gj)
yn = ya + (yb-ya)*pow(j/nj,gj)
'node('n','xn','yn')'
end
end
exit